package com.erp.erp_mask.controller;

import com.erp.erp_mask.mapper.TPropurMapper;
import com.erp.erp_mask.pojo.TPropur;
import com.erp.erp_mask.vo.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

/**
 * @BelongsProject: erp
 * @BelongsPackage: com.erp.erp_mask.controller
 * @Author: wang
 * @CreateTime: 2024-05-31  12:27
 * @Description: TODO
 * @Version: 1.0
 * @effect:
 */
@RestController
@RequestMapping("/pur")
public class TPropurController {
    @Resource
    private TPropurMapper tPropurMapper;
    @GetMapping("/lsearchist")
    public Result  lsearchlist(){
        return Result.success(tPropurMapper.searchlist());
    }
    @GetMapping("/editstate")
    public void editstate(Integer id){
        tPropurMapper.editstate(id);
    }
    @PostMapping("/caiinsert")
    public void caiinsert(@RequestBody TPropur tPropur){
        tPropurMapper.caiinsert(tPropur);
    }
}
